<template>
  <el-dialog
    title="详情"
    :visible.sync="value"
    width="370px"
    :before-close="beforeClose"
  >
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="企业名称" prop="unitName">
        {{form.unitName}}
      </el-form-item>
      <el-form-item label="支撑单位" prop="supportUnitName">
        {{form.supportUnitName}}
      </el-form-item>
    </el-form>
    <el-button class="submit-btn" @click="beforeClose">
      关闭
      <i class="el-icon-arrow-right"></i>
    </el-button>
  </el-dialog>
</template>
<script>
export default {
  props: {
    value: {
      type: Boolean,
      default: false
    },
    row: {
      type: Object,
      default: () => null
    }
  },
  watch: {
    row(row) {
      if (row) {
        this.form = row
      }
    }
  },
  data() {
    return {
      form: {
        unitName: '',
        supportUnitName: '',
      }
    }
  },
  methods: {
    beforeClose() {
      this.$emit('input', false)
    }
  }
}
</script>
<style lang="scss" scoped>
::v-deep .el-dialog .el-dialog__body {
  padding: 30px 0 0;
}
.el-form {
  padding: 0 10px;
}
.check-list {
  padding: 0 40px;
}
.submit-btn {
  width: 100%;
  height: 44px;
  background: #1c4088;
  box-shadow: 0px 4px 48px 32px rgba(6, 23, 80, 0.05);
  border-radius: 0;
  color: #ffffff;
  border: none;
}
</style>